#include <cstring>   // 包含 strlen 和 memcpy 函数
#include <cstdlib>   // 包含 malloc 函数
#include <cstdio>    // 包含标准 I/O 功能（如果需要）
namespace ABV_ANY_SIZE_ARRAY {
	struct OldStyle {
		unsigned char array[1];
	};

	struct GccStyle {
		unsigned char array[0];
	};

	struct C99Style {
		unsigned char array[];
	};


	typedef struct NumericData {
		int varlen;
		char n_data[1];
	} NumericData;

	#define MAX_LEN 2048
	void init(char* data) {
		if (strlen(data) > MAX_LEN) return;
		NumericData* X = (NumericData*)malloc(sizeof(NumericData) + strlen(data));
		X->varlen = strlen(data);
		int k;
		for (k = 0; k < strlen(data); k++) { X->n_data[k] = data[k]; }
		X->n_data[k - 1] = '\0';
	}

	#define MAXL 255
	typedef struct info_t_ {
		unsigned char code;
		unsigned char length[2];
		unsigned char value[1];
	} info_t;

	int getshort(unsigned char* l);

	void foo(info_t* id) {
		unsigned char buf[MAXL];
		int len = getshort(id->length);
		if ((len > 0) && (len <= MAXL)) {
			memcpy(buf, &id->value[0], len);
		}
	}
}